package com.jf.blog.controller;

import com.jf.blog.form.UserinfoUpdateForm;
import com.jf.blog.service.UserinfoService;
import com.jf.blog.util.ResultJson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author JF
 * @since 2025-06-20
 */
@RestController
@RequestMapping("/userinfo")
@Api(tags = "用户模块")
public class UserinfoController {
    @Autowired
    private UserinfoService userinfoService;

    @PostMapping("/update")
    @ApiOperation("添加或修改")
    public ResultJson update(@RequestBody UserinfoUpdateForm form) {
        userinfoService.saveOrUpdate(form);
        return ResultJson.success();
    }

}
